package cn.tedu.shoot;

import java.awt.image.BufferedImage;

/*大敌机*/
public class BigAirplane extends FlyingObject implements EnemyScore {
    private int index = 1;
    private int speed;

    BigAirplane() {
        super(66, 89);
        speed = 2;
    }

    public void step() {
        y += speed;

    }

    public BufferedImage getImage() {
        if (isLive()) {
            return Images.bairs[0];
        } else if (isDead()) {
            BufferedImage img = Images.bairs[index++];
            if (index == Images.bairs.length) {
                stated = REMOVE;
            }
            return img;
        } else {
            return null;
        }

    }

    public int getScore() {
        return 3;
    }
}
